/* ===========================================================
 * JFreeChart : a free chart library for the Java(tm) platform
 * ===========================================================
 *
 * (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
 *
 * Project Info:  http://www.jfree.org/jfreechart/index.html
 *
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
 * License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
 * USA.
 *
 * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
 * in the United States and other countries.]
 *
 * ----------------------
 * SeriesChangeEvent.java
 * ----------------------
 * (C) Copyright 2001-2008, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * Changes
 * -------
 * 15-Nov-2001 : Version 1 (DG);
 * 18-Aug-2003 : Implemented Serializable (DG);
 *
 */

package org.jfree.data.general;

import java.awt.geom.Rectangle2D;
import java.io.Serializable;
import java.util.EventObject;

/**
 * An event with details of a change to a series.
 */
public class SeriesChangeEvent extends EventObject implements Serializable {

    /** For serialization. */
    private static final long serialVersionUID = 1593866085210089052L;
    
    // DA_SPECIFIC ---->
	/**
	 * The area in which values are changed with adjacency or <code>null</code>. Values, in the rectangle, are domain and range axis values
	 * not Java2D values.
	 */
	private Rectangle2D			changedArea;
	// ---->

    /**
     * Constructs a new event.
     *
     * @param source  the source of the change event.
     */
    public SeriesChangeEvent(Object source) {
		// DA_SPECIFIC
		this(source, null);
	}

	// DA_SPECIFIC ---->
	/**
	 * Constructs a new event.
	 * 
	 * @param source the source of the change event.
	 * @param changedArea the changed area or <code>null</code>.
	 */
    public SeriesChangeEvent(Object source, Rectangle2D changedArea) {
        super(source);
        this.changedArea = changedArea;
    }
	// ---->
    
    // DA_SPECIFIC ---->
	/**
	 * Return the area in which values are changed or <code>null</code>.
	 * 
	 * @return the area in which values are changed or <code>null</code>.
	 */
	public Rectangle2D getChangedArea() {
		return this.changedArea;
	}
	// ---->
}
